package com.dingding.dao.sql;

public class UserAccountServiceSQL {
	
	//获取用户钱包SQL
	public static final String GET_USER_WALLET = "SELECT ua.currencyAmount,ui.userIntegral,ua.totalIncome,ua.totalDeposit,ua.totalExpend,ul.isDeposit,ul.depositNumber,ul.couponNumber FROM useraccount ua INNER JOIN userintegral ui ON ua.loginId = ui.loginId INNER JOIN userlogin ul ON ua.loginId = ul.uid WHERE UA.loginId = ?";

	//我的优惠券列表
	public static final String GET_COUPON_LIST = "SELECT  uc.loginId,uc.couponMoney,uc.expiredTime,ct.couponName,uc.ucId FROM usercoupon uc INNER JOIN coupon c ON uc.cpId = c.cpId INNER JOIN coupontype ct ON ct.ctId = c.ctid WHERE uc.couponStatus < 3 AND uc.loginId = ?";
	
	//搭车使用优惠券信息
	public static final String GET_COUPON_INFO = "SELECT uc.ucId,uc.couponMoney FROM usercoupon uc INNER JOIN coupon cp ON cp.cpId = uc.couponId AND cp.couponType = 2 WHERE uc.loginId = ? AND uc.couponStatus = 2 ORDER BY uc.couponMoney ASC ";
	
}
